<script setup lang="ts">
import { throttle } from '@/utils/format';


/**
 * 设置字体大小
*/
const setSize = () => {
  const deviceWidth = document.documentElement.clientWidth;
  const standardWidth = deviceWidth > 750 ? 1500 : 750;
  const fontSize = (deviceWidth * 1) / standardWidth + "px";
  document.documentElement.style.fontSize = deviceWidth > 1500 ? '1px' : fontSize;
};
setSize();
window.addEventListener('resize', throttle(setSize, 0.3));
</script>

<template>
  <router-view></router-view>
</template>
